home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Can main() function be called?
- Date: Tue, 06 Feb 96 15:19:24 GMT
- Organization: none
- Message-ID: <823619964snz@genesis.demon.co.uk>
- References: <823183263.118@fountain.demon.co.uk> <4f1mv0$2fd@cloner4.netcom.com> <4f65a4$b8k@news.microsoft.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4f65a4$b8k@news.microsoft.com>
- a-cnadc@microsoft.com "Dann Corbit" writes:
-
- >You would certainly have to be careful. This is the source of a
- >famous recursion bug:
- >
- >int main()
- >{
- > main();
- >}
- >
- >This is sure to crash in a heinous way on any system where it can
- >be compiled.
-
- That's true but there is nothing special about main in this respect.
- Any recursive system must include a termination condition to prevent
- unbounded recursion.
-
- You can't say that the program above has a bug unless you know what it was
- intended to do! :-)
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-